package com.fz.us.oa.core.service.com.impl;

import com.fz.us.admin.base.bean.search.rule.Rule;
import com.fz.us.admin.company.dao.BaseFlowDao;
import com.fz.us.admin.company.service.impl.BaseFlowServiceImpl;
import com.fz.us.admin.dict.entity.DictItem;
import com.fz.us.oa.core.dao.com.PersonDao;
import com.fz.us.oa.core.entity.com.Person;
import com.fz.us.oa.core.service.com.PersonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by dzw on 2018/3/13.
 */
@Service
public class PersonServiceImpl extends BaseFlowServiceImpl<Person,String> implements PersonService {

    @Autowired
    private PersonDao personDao;

    @Override
    public BaseFlowDao<Person, String> getBaseFlowDao() {
        return personDao;
    }

    @Override
    public int getAllCount(DictItem general) {
        return personDao.getAllCount(general);
    }

    @Override
    public int getResidentCountByStreet(DictItem street) {
        return personDao.getResidentCountByStreet(street);
    }

    @Override
    public List<Person> findPerson(List<Rule> rules) {
        return personDao.findPerson(rules);
    }

    @Override
    public int getCountEduAll(boolean isBeiXuan, DictItem beiXuan, DictItem edu, DictItem general) {
        return personDao.getCountEduAll(isBeiXuan, beiXuan, edu, general);
    }

    @Override
    public int getCountEduAll(boolean isBeiXuan, DictItem beiXuan, DictItem edu, DictItem street, DictItem general) {
        return personDao.getCountEduAll(isBeiXuan,beiXuan,edu,street, general);
    }

    @Override
    public int getCountEduAll(DictItem edu, DictItem general) {
        return personDao.getCountEduAll(edu, general);
    }

    @Override
    public int getCountEduAll(DictItem edu, DictItem street, DictItem general) {
        return personDao.getCountEduAll(edu, street, general);
    }

    @Override
    public int getBeiXuanCount(boolean isBeiXuan, DictItem beiXuan, DictItem general) {
        return personDao.getBeiXuanCount(isBeiXuan, beiXuan, general);
    }

    @Override
    public int getCountByPersonNature(DictItem personNature, DictItem general) {
        return personDao.getCountByPersonNature(personNature, general);
    }

    @Override
    public int getCountByNatureAndStreet(DictItem personNature, DictItem street, DictItem general) {
        return personDao.getCountByNatureAndStreet(personNature,street, general);
    }

    @Override
    public int getCountByStreet(DictItem street, DictItem general) {
        return personDao.getCountByStreet(street, general);
    }

    @Override
    public int getCountByGenderAndBeiXuan(boolean isBeiXuan, DictItem beiXuan, String gender, DictItem general) {
        return personDao.getCountByGenderAndBeiXuan(isBeiXuan, beiXuan, gender, general);
    }

    @Override
    public int getCountByGenderAndBeiXuan(boolean isBeiXuan, DictItem beiXuan, String gender, DictItem street, DictItem general) {
        return personDao.getCountByGenderAndBeiXuan(isBeiXuan, beiXuan, gender, street, general);
    }

    @Override
    public List<Person> getHuanJieCountByStreet(DictItem street, DictItem tuixiufanpin, DictItem general) {
        return personDao.getHuanJieCountByStreet(street, tuixiufanpin, general);
    }

    @Override
    public Person getByKeyId(String keyId) {
        return personDao.getByKeyId(keyId);
    }
}
